# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=elisa
pkgver=20.04.3
pkgrel=0
arch="all !s390x !armhf !mips !mips64" # missing vlc-dev
url="https://kde.org/applications/multimedia/org.kde.elisa"
pkgdesc="A simple music player aiming to provide a nice experience for its users"
license="LGPL-3.0-or-later"
depends="kirigami2 vlc"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtmultimedia-dev qt5-qtsvg-dev qt5-qtquickcontrols2-dev kirigami2-dev ki18n-dev kdeclarative-dev kcoreaddons-dev baloo-dev kfilemetadata-dev kdoctools-dev kxmlgui-dev kconfig-dev kconfigwidgets-dev kcrash-dev kdbusaddons-dev kcmutils-dev kpackage-dev kio-dev vlc-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/elisa-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="00afa92eaab736f5f38759a3076b9f579ee3f5fce84404042a73e11cdfe0e004b32a83f9e542ca6d0a962d66bcb3fcce9d12fc5dbdd8f937d9d4cea9321687b4  elisa-20.04.3.tar.xz"
